#include<iostream>
#include<unistd.h>
#include<vector>
#include<errno.h>
#include<string.h>
#include<cstdlib>
#include<sys/wait.h>
#include<ctime>
#define N 5
class Pipe
{
public:
    Pipe(int cmdpipe,int chid)
    :_cmdpipe(cmdpipe),_chid(chid)
    {}
    int getCmdpipe()const
    {
        return _cmdpipe;
    }
    int getChid()const
    {
        return _chid;
    }
private:
    int _cmdpipe;
    int _chid;
};
void task1()
{
    std::cout<<"创建一个线程"<<std::endl;
}

void task2()
{
    std::cout<<"创建一个进程"<<std::endl;
}

void task3()
{
    std::cout<<"求和"<<std::endl;
}


void setTask(void(*ps[])())
{
    ps[0] = task1;
    ps[1] = task2;
    ps[2] = task3;
}

